#include<stdio.h>
class complex
{
    public:
        complex(double r = 0.0, double i = 0.0){real = r; image = i;}
        complex operator + (complex c2);
        complex operator - (complex c2);
        void display();
    private:
        double real;
        double image;
};
complex complex::operator + (complex c2)
{
    return complex(real + c2.real, image + c2.image);
}
complex complex::operator - (complex c2)
{
    return complex(real - c2.real, image - c2.image);
}
void complex::display()
{
    printf("real = %f, image = %f\n", real, image);
}
int main(int argc, char *argv[])
{
    complex c1(5, 4), c2(2, 10), c3;
    printf("c1 ");
    c1.display();
    printf("c2 ");
    c2.display();
    printf("c3 ");
    c3.display();

    c3 = c1 - c2;
    printf("c3 ");
    c3.display();
    return 0;
}
